We already call _sync in response to dimming changes, which might happen
no matter if we actually do have control over the brightness.
Let's just embrace _sync getting called in any situation and handle that
state gracefully by simply returning early. If we re-gain control, _sync
will be called again and the updated state becomes active.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8648
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3864>
});
}
- if (this._globalScale)
- this._sync({showOSD: false});
+ this._sync({showOSD: false});
this.emit('changed');
}
_sync({showOSD = true} = {}) {
+ if (!this._globalScale)
+ return;
if (this._inhibitUpdates)
return;
this._inhibitUpdates = true;